<!DOCTYPE HTML>
<html>
<head>
<title>会议签到</title> 
<script src="/res/js/common/jquery-1.10.2.js" type="text/javascript"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
<style type="text/css">
body{
	text-align: center;
	background-color: #29cee9;
}
body>div{
	margin-top: 200px;
}
input{ 
    height: 30px;
    width: 200px;
    font-size: 20px;
    padding-left: 15px;
    outline: none;
    border: none;
    margin-bottom: 20px;
}
button{
	font-size: 20px;
    border: none;
    color: white;
    background-color: #00b1db;
    width: 100px;
    height: 32px;
    border-radius: 3px;
    cursor: pointer;
    vertical-align: top;
}
h1{
	color: white;
	margin-top: 100px;
}
label{
	font-size: 20px;
    color: white;
}
</style>
<body style="text-align: center;">  
	<h1>会议签到口令</h1>
	<form id="secretform" >
	<div>
		<label>签到口令：</label>
		<input type="hidden" id="id" value="${id!}">
		<input type="password" name="koul" maxlength="6" autocomplete="off" autofocus="autofocus" placeholder="请输入口令"/> 
		<button id="sub" type="button">确认</button>
	</div> 
	</form>
	<p id="errmsg" style="color:red"></p>
</body>
</html>
<script type="text/javascript">
	$(function() {
		$("#sub").click(function() {
			var form=$("#secretform");
			var id=$("#id").val();
			var secret=$("#koul").val();
			var me = true;
			if (me) {
				$.ajax({
					type : "post",
					dataType : "json",
					url : "/pressconference/validateCommand",
					data : form.serialize(),
					success : function(data) {//成功的时候调用
						if (data.success) {
							me = false;
							location.href="/pressconference/scanseatqrcode?secret="+secret+"&id="+id;
						} else {
							$("#errmsg").text(data.msg);
							me = true;
						}
					}
				});
			}
		});
	});
</script>